<div class="row-fluid">
    <div class="span12">
		<form method="post" name="FilterPluginsForm" action="jsp/admin/system/ManagePlugins.jsp" class="form-inline pull-right">
			<fieldset>
			<legend>
					<label for="plugin_type" class="select">#i18n{portal.system.manage_plugins.labelComboFilter}</label>
					<@comboSorted name="plugin_type" default_value="${current_filter}" items=filter_list />
					<button type="submit" class="btn btn-primary btn-small">
						<i class="icon-filter icon-white"></i>&nbsp;#i18n{portal.system.manage_plugins.buttonFilter}
					</button>
			</legend>
	</fieldset>
			</form>
			<#if plugins_list?has_content >
			<table class="table table-condensed table-striped">
            <tr>
                <th></th>
                <th>#i18n{portal.system.manage_plugins.columnTitleName}</th>
                <!-- th>#i18n{portal.system.manage_plugins.columnTitleStatus}</th>
                <th>#i18n{portal.system.manage_plugins.columnTitleDescription}</th -->
                <th>#i18n{portal.system.manage_plugins.columnTitleDatabase}</th>
                <th>#i18n{portal.util.labelActions}</th>
            </tr>    
            <#list plugins_list as plugin >
            <tr id="plugin_${plugin.name}_${plugin.version}">
                <td>
					<img src="${plugin.iconUrl}" alt="logo" title="${plugin.name}" class="thumbnails thumb-list" >
					<br>
					<#if plugin.installed >
						<span class="label label-success" title="#i18n{portal.system.manage_caches.imgAltEnable}">
							<i class="icon-ok-sign icon-white"></i>&nbsp;#i18n{portal.system.manage_caches.imgAltEnable}
						</span>			
                    <#else>
						<span class="label label-important" title="#i18n{portal.system.manage_caches.imgAltDisable}">
							<i class="icon-remove-sign icon-white"></i>&nbsp;#i18n{portal.system.manage_caches.imgAltDisable}
						</span>	
                    </#if>
				</td>
                <td>
					<h4>${plugin.name}</h4> 
					<h5>&nbsp;#i18n{portal.system.manage_plugins.labelVersion}: ${plugin.version}</h5>
                    <p>#i18n{${plugin.description}}</p>
					<p>
						<i class="icon-user"></i>&nbsp;
						<em>#i18n{portal.system.manage_plugins.labelAuthor} : #i18n{${plugin.provider}}</em>&nbsp;|
						<i class="icon-globe"></i>&nbsp;
						<em>#i18n{portal.system.manage_plugins.labelAuthorUrl} : <a href="${plugin.providerUrl}" target="_blank">${plugin.providerUrl}</a></em>
					</p> 
                </td>
                <td>
                    <#if plugin.installed >
						<#if plugin.dbPoolRequired >
							<form method="post" class="form-inline" action="jsp/admin/system/DoModifyPluginPool.jsp#plugin_${plugin.name}_${plugin.version}">
								<@comboSortedWithParams name="db_pool_name" default_value="${plugin.dbPoolName}" items=pools_list  additionalParameters="class=\"input-small\"" />
								<input type="hidden" name="plugin_name" value="${plugin.name}" />
								<button type="submit" class="btn btn-primary btn-small" title="#i18n{portal.system.manage_plugins.buttonModifyDbPool}"  >
									<i class="icon-ok icon-white"></i> #i18n{portal.util.labelModify}
								</button>
							</form>
						</#if>   
                    </#if>
                </td>
                <td>
                    <a class="btn btn-primary btn-small" href="jsp/admin/system/ViewPluginDescription.jsp?plugin_name=${plugin.name}" title="#i18n{portal.system.manage_plugins.actionDisplay}">
                        <i class="icon-info-sign icon-white"></i>
                    </a>
                    <#if plugin.installed >
						<form method="post" class="form-inline pull-left spaced" action="jsp/admin/system/ConfirmUninstallPlugin.jsp">
							<input type="hidden" name="plugin_name" value="${plugin.name}" />
							<button type="submit" class="btn btn-danger btn-small" title="#i18n{portal.system.manage_plugins.buttonDisable}">
								<i class="icon-stop icon-white"></i>
							</button>
						</form>
                    <#else>
						<form method="post" class="form-inline pull-left spaced" action="jsp/admin/system/DoInstallPlugin.jsp#plugin_${plugin.name}_${plugin.version}" class="form-inline">
							<input type="hidden" name="plugin_name" value="${plugin.name}" />
							<button type="submit" class="btn btn-success btn-small" title="#i18n{portal.system.manage_plugins.buttonEnable}">
								<i class="icon-play icon-white"></i>
							</button>
						</form>
                    </#if>
                </td>
            </tr>	
            </#list>
			</table>
		<#else>
			<div class="alert alert-error">#i18n{portal.system.manage_plugins.filterNoResult}</div>
		</#if>
	</div>
</div>

